Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 6 - Printing Resources / Printing Resources Reference
Resources Used Only in Printer Drivers


The Capture ('cpts') Resource

The capture ('cpts') resource, of type gxCaptureType, allows devices to be removed and replaced on a network during printer sharing (through the GXCaptureOutputDevice message). This resource is not needed if your driver does not support the capture-and-release concept. The default version of the GXCaptureOutputDevice messages uses these resources and works only for PAP devices. Figure 6-21 shows the structure of a capture resource.

Figure 6-21 The capture resource

The system performs string substitution in any of the capture strings and defines constants that you can use for this purpose. Each of these constants is replaced with the appropriate value at run time. The constant strings are shown in Table 6-27.
Table 6-27 Substitution strings for the capture resource
ConstantExplanation
PRINTERNAMEReplaced with the name of the printer
PRINTERTYPEReplaced with the name-binding protocol (NBP) type of
the printer
NAMELENReplaced with a single byte that is the length of the
printer name
TYPELENReplaced with a single byte that is the length of the printer
NBP type

The four capture resources shown in Listing 6-19 are taken from the ImageWriter II printer driver.

Listing 6-19 Examples of capture resources for a printer driver

resource gxCaptureType (gxCapturedAppleTalkType, sysHeap,
                                                 purgeable)
{
   "\0D011ImageShared"};
resource gxCaptureType (gxUncapturedAppleTalkType, sysHeap,
                                                   purgeable)
{
   "\0D011ImageWriter"};
resource gxCaptureType (gxCaptureStringID, sysHeap, purgeable)
{
   "\0X1B\0X62NAMELENPRINTERNAMETYPELENPRINTERTYPE\0X01*"};
resource gxCaptureType (gxReleaseStringID, sysHeap, purgeable)
{
   "\0X1B\0X62NAMELENPRINTERNAMETYPELENPRINTERTYPE\0X01*"};

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help